package com.mmd.admin.model.pojo.request;

import com.mmd.base.annotation.valid.group.ValidGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

@Data
@ApiModel("新增编辑角色")
public class RoleAddParam {
    @NotNull(message = "请选择编辑的角色",groups = ValidGroup.Update.class)
    @ApiModelProperty("唯一主键id")
    private Long id;

    @NotBlank(message = "名称不可为空",groups = {ValidGroup.Insert.class })
    @ApiModelProperty("角色名称")
    private String name;

    @ApiModelProperty("权限集合")
    private List<Long> ruleIds = new ArrayList<>();
}
